from multiprocessing import Queue
if __name__=='__main__':
    q=Queue(3)
    q.put('hello')
    q.put('world')
    q.put('python')

    q.put('html',block=True,timeout=2)#等待两秒，队列还没有空位值就抛异常